<div id="update-options"></div>
<div class="header">
<p>
Next: [[cvs: update output#update output|update output]], Up: [[cvs: update--Bring work tree in sync with repository#update&mdash;Bring work tree in sync with repository|update]] &nbsp; |[[cvs: Index#SEC_Contents|Contents]]||[[cvs: Index#Index|Index]]|</p>
</div>

----

<div id="update-options-1"></div>
==== update options ====

These standard options are available with <code>update</code>
(see [[cvs: Common command options#Common command options|Common options]], for a complete description of
them):

;<code>-D date</code>
: Use the most recent revision no later than <var>date</var>. This option is sticky, and implies &lsquo;<code>-P</code>&rsquo;. See [[cvs: Sticky tags#Sticky tags|Sticky tags]], for more information on sticky tags/dates.

;<code>-f</code>
: Only useful with the &lsquo;<code>-D <var>date</var></code>&rsquo; or &lsquo;<code>-r <var>tag</var></code>&rsquo; flags.  If no matching revision is found, retrieve the most recent revision (instead of ignoring the file).

;<code>-k <var>kflag</var></code>
: Process keywords according to <var>kflag</var>.  See [[cvs: Keyword substitution#Keyword substitution|Keyword substitution]]. This option is sticky; future updates of this file in this working directory will use the same <var>kflag</var>.  The <code>status</code> command can be viewed to see the sticky options.  See [[cvs: Quick reference to CVS commands#Quick reference to CVS commands|Invoking CVS]], for more information on the <code>status</code> command.

;<code>-l</code>
: Local; run only in current working directory.  See [[cvs: Recursive behavior#Recursive behavior|Recursive behavior]].

;<code>-P</code>
: Prune empty directories.  See [[cvs: Moving and renaming directories#Moving and renaming directories|Moving directories]].

;<code>-p</code>
: Pipe files to the standard output.

;<code>-R</code>
: Update directories recursively (default).  See [[cvs: Recursive behavior#Recursive behavior|Recursive behavior]].

;<code>-r rev</code>
: Retrieve revision/tag <var>rev</var>.  This option is sticky, and implies &lsquo;<code>-P</code>&rsquo;. See [[cvs: Sticky tags#Sticky tags|Sticky tags]], for more information on sticky tags/dates.

These special options are also available with
<code>update</code>.

;<code>-A</code>
: Reset any sticky tags, dates, or &lsquo;<code>-k</code>&rsquo; options. See [[cvs: Sticky tags#Sticky tags|Sticky tags]], for more information on sticky tags/dates.

;<code>-C</code>
: Overwrite locally modified files with clean copies from the repository (the modified file is saved in &lsquo;<tt>.#<var>file</var>.<var>revision</var></tt>&rsquo;, however).

;<code>-d</code>
: Create any directories that exist in the repository if they&rsquo;re missing from the working directory.  Normally, <code>update</code> acts only on directories and files that were already enrolled in your working directory.

: This is useful for updating directories that were created in the repository since the initial checkout; but it has an unfortunate side effect.  If you deliberately avoided certain directories in the repository when you created your working directory (either through use of a module name or by listing explicitly the files and directories you wanted on the command line), then updating with &lsquo;<code>-d</code>&rsquo; will create those directories, which may not be what you want.

;<code>-I <var>name</var></code>
: Ignore files whose names match <var>name</var> (in your working directory) during the update.  You can specify &lsquo;<code>-I</code>&rsquo; more than once on the command line to specify several files to ignore.  Use &lsquo;<code>-I !</code>&rsquo; to avoid ignoring any files at all.  See [[cvs: Ignoring files via cvsignore#Ignoring files via cvsignore|cvsignore]], for other ways to make <small>CVS</small> ignore some files.

;<code>-W<var>spec</var></code>
: Specify file names that should be filtered during update.  You can use this option repeatedly.

: <var>spec</var> can be a file name pattern of the same type that you can specify in the &lsquo;<tt>.cvswrappers</tt>&rsquo; file. See [[cvs: The cvswrappers file#The cvswrappers file|Wrappers]].

;<code>-j<var>revision</var></code>
: With two &lsquo;<code>-j</code>&rsquo; options, merge changes from the revision specified with the first &lsquo;<code>-j</code>&rsquo; option to the revision specified with the second &lsquo;<code>j</code>&rsquo; option, into the working directory.

: With one &lsquo;<code>-j</code>&rsquo; option, merge changes from the ancestor revision to the revision specified with the &lsquo;<code>-j</code>&rsquo; option, into the working directory.  The ancestor revision is the common ancestor of the revision which the working directory is based on, and the revision specified in the &lsquo;<code>-j</code>&rsquo; option.

: Note that using a single &lsquo;<code>-j <var>tagname</var></code>&rsquo; option rather than &lsquo;<code>-j <var>branchname</var></code>&rsquo; to merge changes from a branch will often not remove files which were removed on the branch. See [[cvs: Merging can add or remove files#Merging can add or remove files|Merging adds and removals]], for more.

: In addition, each &lsquo;<code>-j</code>&rsquo; option can contain an optional date specification which, when used with branches, can limit the chosen revision to one within a specific date.  An optional date is specified by adding a colon (:) to the tag: &lsquo;<code>-j<var>Symbolic_Tag</var>:<var>Date_Specifier</var></code>&rsquo;.

: See [[cvs: Branching and merging#Branching and merging|Branching and merging]].



----

<div class="header">
<p>
Next: [[cvs: update output#update output|update output]], Up: [[cvs: update--Bring work tree in sync with repository#update&mdash;Bring work tree in sync with repository|update]] &nbsp; |[[cvs: Index#SEC_Contents|Contents]]||[[cvs: Index#Index|Index]]|</p>
</div>
This document was generated on <i>a sunny day</i> using [http://www.nongnu.org/texi2html/ <i>texi2html</i>].
